#include "mode_custom_config.h"
CUSTOM_SYS custom_sys;

void set_custom_ssp(u8 ssp)
{
    custom_sys.ssp = ssp;
    LOG_INFO("set custom_sys.ssp %d\n",custom_sys.ssp);
}

u8 get_custom_ssp()
{
    return custom_sys.ssp;
}

void set_custom_last_ssp(u8 lastssp)
{
    custom_sys.lastssp = lastssp;
    LOG_INFO("set_custom_last_ssp %d\n",custom_sys.lastssp);
}

u8 get_custom_last_ssp()
{
    return custom_sys.lastssp;
}


void set_custom_recssp(u8 recssp)
{
    custom_sys.recssp =recssp;
    LOG_INFO("custom_sys.recssp %d\n",custom_sys.recssp);
}

u8 get_custom_recssp()
{
    return custom_sys.recssp;
}

void custom_write_partition(u8 code,u8 *buf)
{
    write_partition(CUSTOM_LOCA+CUSTOM_ADD*code,(void *)buf,((u8)buf[2]+3));
}

void custom_read_partition(u8 code,LIGHT_EFFECT_T *config)
{
    read_partition(CUSTOM_LOCA+CUSTOM_ADD*code,config,sizeof(LIGHT_EFFECT_T));
}